package com.sjhang.controller;


import com.sjhang.entity.TbTeach;
import com.sjhang.service.TbTeachService;
import com.sjhang.utils.ListParamVo;
import com.sjhang.utils.ResultResponse;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 教材表
 前端控制器
 *
 */
@Api(tags = {"教材接口"})
@RestController
@RequestMapping("/tbTeach")
public class TbTeachController {

    @Resource
    private TbTeachService tbTeachService;

    /***
     * @description 查询大纲对应的教材
     */
    @PostMapping("/selectTeach")
    public ResultResponse selectTeach(@RequestBody ListParamVo listParamVo){
        return tbTeachService.selectTeach(listParamVo);
    }


    /***
     * @description 新增对应教材
     */
    @PostMapping("/insertTeach")
    public ResultResponse insertTeach(TbTeach tbTeach){
        return tbTeachService.insertTeach(tbTeach);
    }

    /***
     * @description 修改对应教材
     */
    @PostMapping("/updateTeach")
    public ResultResponse updateTeach(TbTeach tbTeach){
        return tbTeachService.updateTeach(tbTeach);
    }

    /***
     * @description 删除对应教材
     */
    @PostMapping("/deleteTeach")
    public ResultResponse deleteTeach(Long listParamVo){
        return tbTeachService.deleteTeach(listParamVo);
    }





}

